package com.yl.flink.processor;

import com.yl.entity.PrimaryWarn;
import lombok.extern.slf4j.Slf4j;
import org.apache.flink.api.common.functions.MapFunction;

@Slf4j
public class PrintWarnFunc implements MapFunction<PrimaryWarn, PrimaryWarn> {

    /**
     * 打印告警信息
     */
    @Override
    public PrimaryWarn map(PrimaryWarn primaryWarn) throws Exception {
        log.info("warn:{}", primaryWarn);
        return primaryWarn;
    }
}
